package jsu.lipengcheng.trafficnet.controlle.user;

import jsu.lipengcheng.trafficnet.common.Result;
import jsu.lipengcheng.trafficnet.pojo.TicketVO;
import jsu.lipengcheng.trafficnet.service.TicketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/user/ticket")
public class TicketControlle {
    @Autowired
    private TicketService ticketService;

    /**
     * 用户获取自己罚单
     * @return
     */
    @GetMapping()
    public Result getusertictet(){
        List<TicketVO> ticketVO = ticketService.selectuserbyid();
        return Result.success(ticketVO);
    }

}
